module BugColumnsHelper
  
  ## 
  # takes a string of comma seperated bug_column_ids
  # returns a string of bug column names as they are 
  # known by the generators, seperated by comas 
  def self.format_columns_for_generator(column_ids)
    generator_formated_bug_columns = ''
    column_ids.split(",").each do |column_application_id| 
      generator_formated_bug_columns += BugColumn.find_by_application_id(column_application_id.to_s).field_name
      unless column_application_id == column_ids.split(",").last
        generator_formated_bug_columns += ","
      end
    end
    generator_formated_bug_columns 
  end    
  
  ##
  # change the look of the description field when editing
  def description_update(record)
    text_area :record, :description, :cols => 25, :rows => 10
  end
  
end
